package com.sscw.task.enums;

/**
 * @Author: zhangxilin
 * @Date: 2025/3/27
 */
public enum PropsTypeEnum {
    CARD_CW("card_cw", "畅玩卡", 5),
    CARD_GM("card_gm", "改名卡"),
    CARD_SJ("card_sj", "锁机卡", 5),
    CARD_JG("card_jg", "禁观卡", 5),
    CARD_XLB("card_xlb", "小喇叭"),
    ;

    private String code;

    private String desc;

    private Integer duration;


    public static PropsTypeEnum getByCode(String code){
        for (PropsTypeEnum enums : PropsTypeEnum.values()){
            if (enums.getCode().equals(code)){
                return enums;
            }
        }
        return  null;
    }

    PropsTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    PropsTypeEnum(String code, String desc, Integer duration) {
        this.code = code;
        this.desc = desc;
        this.duration = duration;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }
}
